package org.prime;

import java.math.BigInteger;

public class Tests extends LongInteger {
        public static void main (String[]args){
        	int a=1002,b=150,c=0;
                
        		LongInteger A=new LongInteger(); 
                A.set(a);
                LongInteger B=new LongInteger();
                B.set(b);
                
                LongInteger C = new LongInteger();
                
                BigInteger AA = new  BigInteger ("1002");
                BigInteger BB = new  BigInteger ("150");
                BigInteger CC = new  BigInteger ("0");
                
                
                
                C=A.add2(B);
                CC=AA.add(BB);
                
                System.out.print("Metoda add LI: ");
        
                for (int i=0;i<C.size;i++)
                        System.out.print(C.value[i]);           
        
                System.out.print(" BI: ");
                System.out.print(CC);           
                A.set(a);
                CC=new BigInteger ("0");
                
                A.multiply(B);
                CC=AA.multiply(BB);
                
                System.out.print("\nMetoda multiply LI: ");
        
                for (int i=0;i<A.size;i++)
                        System.out.print(A.value[i]);           
        
                System.out.print(" BI: ");
                System.out.print(CC);           
        

                A.set(a);
                C.set(c);
                CC=new BigInteger ("0");
                
                C=(A.mod(B));
                CC=AA.mod(BB);
                
                System.out.print("\nMetoda mod LI: ");
        
                for (int i=0;i<C.size;i++)
                        System.out.print(C.value[i]);           
                System.out.print(" BI: ");
                System.out.print(CC);           
                A.set(a);
                C.set(c);
                CC=new BigInteger ("0");
                
               C= A.divide(B);
                CC=AA.divide(BB);
                
                System.out.print("\nMetoda divide LI: ");
                for (int i=0;i<C.size;i++)
                        System.out.print(C.value[i]);           
                
                System.out.print(" BI: ");
                System.out.print(CC);
                
                
                A.set(a);
//                C.set(0);
                CC=new BigInteger ("0");
                
                System.out.print("\n");           
                
                for (int i=0;i<A.size;i++)
                    System.out.print(A.value[i]);           
            
                
                C=A.sqrt();
                CC=BigIntegerExtender.sqrt(AA);
                
                System.out.print("\nMetoda sqrt LI: ");
                for (int i=0;i<C.size;i++)
                        System.out.print(C.value[i]);           
                
                System.out.print(" BI: ");
                System.out.print(CC);
                
                A.set(a);
                B.set(b);
                 
                if(A.lesser(B)) 
                                System.out.println("\nfirst number is lesser");
                 if(A.greater(B)) 
                                System.out.println("\nfirst number is greater");
                 if(A.equals(B)) 
                                System.out.println("\nnumbers equal");
                 
                 
                 if (A.divisibleBy(B))
                                System.out.println("divisable ");
                 else 
                                System.out.println("NOT divisable ");
                  
                 
                
        }
}